package fundamental;

public class Cand extends Point {
    public double cost;
    public boolean isOpen;
    public int loading;
    public Customer sameCust;
    public int overLoading;

    public Cand(int num, double cost) {
        super(num);
        this.cost = cost;
        this.isOpen = false;
        this.loading = 0;
        this.overLoading = 0;
    }

    public Cand() {
        super();
    }

    public void initial() {
        this.isOpen = false;
        this.loading = 0;
        this.overLoading = 0;
    }

    public void flashLoading(int cap) {
        while (loading > cap) {
            loading -= cap;
            overLoading += cap;
        }
    }

    @Override
    public String toString() {
        return String.valueOf(num);
    }
}
